Resource URL: /platform/<<version=4>>/performance/workload-categories/<WORKLOAD-CATEGORY>

    Overview: This resource represents a single workload category. A workload
              category is a set of "elements" for which performance statistics
              will be collected.  These elements are aspects of the system
              whose performance you might be interested in, like "username" or
              "protocol".  The list of available elements can be found at the
              /performance/category-elements URI.  Creating a new workload
              category will cause new sets of statistics about the elements you
              specify to start being collected.  For example, when you create a
              workload category with elements "username" and "protocol", OneFS
              will start collecting statistics associated with all
              username/protocol combinations  .Statistics about the top
              resuorce-consuming element combinations for a given category are
              available at the URI
              /statistics/current?key=node.accounting.workloads.category.<category-id>.
              How many top-level combinations will be tracked independently can
              be configured with the "top_n_collection_count" setting at the
              /performance/settings URI.  In addition to tracking the top
              element combinations, you can create individual "workloads" to
              select specific instances of the elements you are particularly
              interested in, whether or not they are among the top resource
              consuming combinations.  See the
              /performance/workload-categories/<WORKLOAD-CATEGORY>/workloads
              URI for details.

     Methods: GET, PUT, DELETE

********************************************************************************

Method GET: Retrieve the workload category

       URL: GET
            /platform/<<version=4>>/performance/workload-categories/<WORKLOAD-CATEGORY>

There are no query arguments for this method.

GET response body schema:
{
  "type": [
    {
      "additionalProperties": false, 
      "type": "object", 
      "description": "A list of errors that may be returned.", 
      "properties": {
        "errors": {
          "items": {
            "additionalProperties": false, 
            "type": "object", 
            "description": "An object describing a single error.", 
            "properties": {
              "field": {
                "type": "string", 
                "description": "The field with the error if applicable."
              }, 
              "message": {
                "type": "string", 
                "description": "The error message."
              }, 
              "code": {
                "type": "string", 
                "description": "The error code."
              }
            }
          }, 
          "type": "array"
        }
      }
    }, 
    {
      "additionalProperties": false, 
      "type": "object", 
      "properties": {
        "workload_categories": {
          "minItems": 0, 
          "items": {
            "type": "object", 
            "description": "A workload category can be configured to track different sets of workloads.", 
            "properties": {
              "category_elements": {
                "items": {
                  "enum": [
                    "zone_name", 
                    "protocol", 
                    "username", 
                    "local_address", 
                    "remote_address", 
                    "job_type", 
                    "system_name"
                  ], 
                  "type": "string", 
                  "description": "Elements that are used to define a workload category. This list includes elements reserved for the default system workload category."
                }, 
                "type": "array", 
                "description": "The category elements defining the workload category."
              }, 
              "creation_time": {
                "type": "integer", 
                "description": "Timestamp of when the workload category was created."
              }, 
              "statkey": {
                "type": "string", 
                "description": "Key for use in viewing associated raw statistics under the endpoints platform/1/statistics/history and platform/1/statistics/current."
              }, 
              "workload_count": {
                "type": "integer", 
                "description": "A count of the resource allocation tokens for this workload."
              }, 
              "id": {
                "type": "integer", 
                "description": "Identifies the configured workload category."
              }, 
              "name": {
                "type": "string", 
                "description": "The name of the workload category. If a name is not specified, then a default name is assigned. The default name will be an underscore separated list of the category elements.", 
                "maxLength": 80
              }
            }
          }, 
          "type": "array", 
          "maxItems": 4294967295
        }
      }
    }
  ]
}

********************************************************************************

Method PUT: Modify the name of the workload category

       URL: PUT
            /platform/<<version=4>>/performance/workload-categories/<WORKLOAD-CATEGORY>

There are no query arguments for this method.

PUT request body schema:
{
  "type": "object", 
  "description": "A workload category can be configured to track different sets of workloads.", 
  "properties": {
    "name": {
      "type": "string", 
      "description": "The name of the workload category. If a name is not specified, then a default name is assigned. The default name will be an underscore separated list of the category elements.", 
      "maxLength": 80
    }, 
    "workload_count": {
      "type": "integer", 
      "description": "A count of the resource allocation tokens for this workload."
    }
  }
}

There is no JSON response body for this method.

********************************************************************************

Method DELETE: Delete the workload category

          URL: DELETE
               /platform/<<version=4>>/performance/workload-categories/<WORKLOAD-CATEGORY>

There are no query arguments for this method.

There is no JSON response body for this method.
